home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 41 / Amiga Format CD41 (1999-06)(Future Publishing)(GB)[!][issue 1999-07].iso / -seriously_amiga- / programming / other / gtlayout / source / ltp_blinkbutton.c < prev    next >
C/C++ Source or Header  |  1999-04-19  |  1KB  |  75 lines

  1. /*
  2. **    GadTools layout toolkit
  3. **
  4. **    Copyright © 1993-1998 by Olaf `Olsen' Barthel
  5. **        Freely distributable.
  6. */
  7.  
  8. #ifndef _GTLAYOUT_GLOBAL_H
  9. #include "gtlayout_global.h"
  10. #endif
  11.  
  12. #include "Assert.h"
  13.  
  14. BOOL
  15. LTP_BlinkButton(LayoutHandle *handle,struct Gadget *gadget)
  16. {
  17.     ObjectNode *Node;
  18.     BOOL Result;
  19.  
  20.     Result = FALSE;
  21.  
  22.     Node = (ObjectNode *)gadget->UserData;
  23.  
  24.     if(Node->Host == gadget)
  25.     {
  26.         switch(Node->Type)
  27.         {
  28.             #ifdef DO_POPUP_KIND
  29.             {
  30.                 case POPUP_KIND:
  31.  
  32.                     SetGadgetAttrs(Node->Host,handle->Window,NULL,
  33.                         PIA_Highlight,    TRUE,
  34.                     TAG_DONE);
  35.  
  36.                     LTP_Delay(0,80000);
  37.  
  38.                     SetGadgetAttrs(Node->Host,handle->Window,NULL,
  39.                         PIA_Highlight,    FALSE,
  40.                     TAG_DONE);
  41.  
  42.                     Result = TRUE;
  43.  
  44.                     break;
  45.             }
  46.             #endif
  47.  
  48.             #ifdef DO_TAB_KIND
  49.             {
  50.                 case TAB_KIND:
  51.  
  52.                     break;
  53.             }
  54.             #endif
  55.  
  56.             default:
  57.  
  58.                 if((gadget->Flags & (GFLG_GADGIMAGE | GFLG_GADGHIMAGE)) == (GFLG_GADGIMAGE | GFLG_GADGHIMAGE) && gadget->GadgetRender && gadget->SelectRender)
  59.                 {
  60.                     DrawImageState(&handle->RPort,gadget->SelectRender,gadget->LeftEdge,gadget->TopEdge,IDS_SELECTED,handle->DrawInfo);
  61.  
  62.                     LTP_Delay(0,80000);
  63.  
  64.                     DrawImageState(&handle->RPort,gadget->GadgetRender,gadget->LeftEdge,gadget->TopEdge,IDS_NORMAL,handle->DrawInfo);
  65.                 }
  66.  
  67.                 Result = TRUE;
  68.  
  69.                 break;
  70.         }
  71.     }
  72.  
  73.     return(Result);
  74. }
  75.